{% load unfold i18n admin_urls unfold %}

<div class="flex flex-row grow font-semibold items-center min-w-0 mr-3">
    {% if is_nav_sidebar_enabled %}
        <span class="cursor-pointer flex flex-row items-center">
            <span class="material-symbols-outlined hidden! xl:block!" x-on:click="sidebarDesktopOpen = !sidebarDesktopOpen; localStorage.setItem('sidebarDesktopOpen', sidebarDesktopOpen ? '1' : '0');">
                dock_to_right
            </span>

            <span class="material-symbols-outlined block! xl:hidden!" x-on:click="sidebarMobileOpen = !sidebarMobileOpen">
                dock_to_right
            </span>
        </span>
    {% endif %}

    <span class="block bg-base-200 h-5 mx-3 w-px dark:bg-base-700"></span>

    {% include "unfold/helpers/header_back_button.html" %}

    <h1 class="overflow-hidden leading-5 text-ellipsis text-font-important-light whitespace-nowrap xl:text-base dark:text-font-important-dark">
        {% header_title %}

        {% if cl and cl.full_result_count != cl.result_count and cl.paginator|class_name != "InfinitePaginator" %}
            <span class="font-medium ml-2 text-font-subtle-light text-sm dark:text-font-subtle-dark">
                {% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktranslate with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktranslate %}{% else %}{% translate "Show all" %}{% endif %}</a>)
            </span>
        {% endif %}
    </h1>
</div>
